from sys import stdin,argv
from random import randint
from copy import copy

def even(x):
	"""
	>>> print even(42)
	True
	"""
	return x%2 == 0

def odd(x):
	"""
	>>> print odd(43)
	True
	"""
	return x%2 != 0

def check(arr):
	"""
	>>> print check([1,3,5,7])
	True
	>>> print check([2,1,3])
	True
	>>> print check([])
	True
	>>> print check([2,1,4])
	False
	"""
	ev = True
	for x in arr:
		if not ev and even(x):
			return False
		ev = ev and even(x)
	return True

def recursive(arr, i=0, u=None):
	if u == None:
		u = len(arr) - 1
	if i < u:
		if even(arr[i]):
			return recursive(arr, i+1, u)
		else:
			arr[i], arr[u] = arr[u] , arr[i]
			return recursive(arr, i, u-1)
	else:
		return arr

def gen(sz, lb, ub):
	"""Generates a list of sz int in [lb, ub]"""
	arr = []
	for i in range(sz+1):
		arr.append(randint(lb, ub))
	return arr


if len(argv)==2:
	import doctest
	doctest.testmod()
	if argv[1].isdigit():
		ct = int(argv[1])
		fails = 0
		for i in range(ct):
			arr = gen(20, -5, 10)
			a = recursive(copy(arr))
			if not check(a):
				print arr
				print "r", b
				fails += 1
		if fails==0:
			print "It looks like the tested algorithm works!"
		else:
			print "Failures:", fails, "/", ct, "tests"
	else:
		print "Please provide a number of tests or no parameter at all."
else:
	arr = map(lambda x: int(x), stdin.readlines())
	print "The tested algorithm says", recursive(copy(arr))
